package chalmersbot;
import chalmersbot.Absyn.*;
/*** BNFC-Generated Visitor Design Pattern Skeleton. ***/
/* This implements the common visitor design pattern.
   Tests show it to be slightly less efficient than the
   instanceof method, but easier to use. 
   Replace the R and A parameters with the desired return
   and context types.*/

public class VisitSkel
{
  public class SentenceVisitor<R,A> implements Sentence.Visitor<R,A>
  {
    public R visit(chalmersbot.Absyn.QSentence p, A arg)
    {
      /* Code For QSentence Goes Here */

      p.qphrase_.accept(new QPhraseVisitor<R,A>(), arg);

      return null;
    }

  }
  public class QPhraseVisitor<R,A> implements QPhrase.Visitor<R,A>
  {
    public R visit(chalmersbot.Absyn.QPhraseSimple p, A arg)
    {
      /* Code For QPhraseSimple Goes Here */

      p.phrase_.accept(new PhraseVisitor<R,A>(), arg);

      return null;
    }

  }
  public class PhraseVisitor<R,A> implements Phrase.Visitor<R,A>
  {
    public R visit(chalmersbot.Absyn.QYesNoAux p, A arg)
    {
      /* Code For QYesNoAux Goes Here */

      p.verb_1.accept(new VerbVisitor<R,A>(), arg);
      p.subject_.accept(new SubjectVisitor<R,A>(), arg);
      p.verb_2.accept(new VerbVisitor<R,A>(), arg);

      return null;
    }
    public R visit(chalmersbot.Absyn.QYesNoIs p, A arg)
    {
      /* Code For QYesNoIs Goes Here */

      p.isvrb_.accept(new IsVrbVisitor<R,A>(), arg);
      p.subject_.accept(new SubjectVisitor<R,A>(), arg);

      return null;
    }
    public R visit(chalmersbot.Absyn.QWordIsSub p, A arg)
    {
      /* Code For QWordIsSub Goes Here */

      p.qword_.accept(new QWordVisitor<R,A>(), arg);
      p.isvrb_.accept(new IsVrbVisitor<R,A>(), arg);
      p.subject_.accept(new SubjectVisitor<R,A>(), arg);

      return null;
    }
    public R visit(chalmersbot.Absyn.QWordIsSubVerb p, A arg)
    {
      /* Code For QWordIsSubVerb Goes Here */

      p.qword_.accept(new QWordVisitor<R,A>(), arg);
      p.isvrb_.accept(new IsVrbVisitor<R,A>(), arg);
      p.subject_.accept(new SubjectVisitor<R,A>(), arg);
      p.verb_.accept(new VerbVisitor<R,A>(), arg);

      return null;
    }
    public R visit(chalmersbot.Absyn.QWordIsSubVerbPreSub p, A arg)
    {
      /* Code For QWordIsSubVerbPreSub Goes Here */

      p.qword_.accept(new QWordVisitor<R,A>(), arg);
      p.isvrb_.accept(new IsVrbVisitor<R,A>(), arg);
      p.subject_1.accept(new SubjectVisitor<R,A>(), arg);
      p.verb_.accept(new VerbVisitor<R,A>(), arg);
      p.preposition_.accept(new PrepositionVisitor<R,A>(), arg);
      p.subject_2.accept(new SubjectVisitor<R,A>(), arg);

      return null;
    }
    public R visit(chalmersbot.Absyn.QWordSubVerb p, A arg)
    {
      /* Code For QWordSubVerb Goes Here */

      p.qword_.accept(new QWordVisitor<R,A>(), arg);
      p.subject_.accept(new SubjectVisitor<R,A>(), arg);
      p.verb_.accept(new VerbVisitor<R,A>(), arg);

      return null;
    }
    public R visit(chalmersbot.Absyn.QWordSubVerbSub p, A arg)
    {
      /* Code For QWordSubVerbSub Goes Here */

      p.qword_.accept(new QWordVisitor<R,A>(), arg);
      p.subject_1.accept(new SubjectVisitor<R,A>(), arg);
      p.verb_.accept(new VerbVisitor<R,A>(), arg);
      p.subject_2.accept(new SubjectVisitor<R,A>(), arg);

      return null;
    }
    public R visit(chalmersbot.Absyn.QWordSubVerbAdj p, A arg)
    {
      /* Code For QWordSubVerbAdj Goes Here */

      p.qword_.accept(new QWordVisitor<R,A>(), arg);
      p.subject_.accept(new SubjectVisitor<R,A>(), arg);
      p.verb_.accept(new VerbVisitor<R,A>(), arg);
      p.adjective_.accept(new AdjectiveVisitor<R,A>(), arg);

      return null;
    }
    public R visit(chalmersbot.Absyn.QWordSubVerbPreSub p, A arg)
    {
      /* Code For QWordSubVerbPreSub Goes Here */

      p.qword_.accept(new QWordVisitor<R,A>(), arg);
      p.subject_1.accept(new SubjectVisitor<R,A>(), arg);
      p.verb_.accept(new VerbVisitor<R,A>(), arg);
      p.preposition_.accept(new PrepositionVisitor<R,A>(), arg);
      p.subject_2.accept(new SubjectVisitor<R,A>(), arg);

      return null;
    }
    public R visit(chalmersbot.Absyn.QWordSubIsVerb p, A arg)
    {
      /* Code For QWordSubIsVerb Goes Here */

      p.qword_.accept(new QWordVisitor<R,A>(), arg);
      p.subject_.accept(new SubjectVisitor<R,A>(), arg);
      p.isvrb_.accept(new IsVrbVisitor<R,A>(), arg);
      p.verb_.accept(new VerbVisitor<R,A>(), arg);

      return null;
    }
    public R visit(chalmersbot.Absyn.QWordSubIsSub p, A arg)
    {
      /* Code For QWordSubIsSub Goes Here */

      p.qword_.accept(new QWordVisitor<R,A>(), arg);
      p.subject_1.accept(new SubjectVisitor<R,A>(), arg);
      p.isvrb_.accept(new IsVrbVisitor<R,A>(), arg);
      p.subject_2.accept(new SubjectVisitor<R,A>(), arg);

      return null;
    }
    public R visit(chalmersbot.Absyn.QWordSubIsSubAdjPre p, A arg)
    {
      /* Code For QWordSubIsSubAdjPre Goes Here */

      p.qword_.accept(new QWordVisitor<R,A>(), arg);
      p.subject_1.accept(new SubjectVisitor<R,A>(), arg);
      p.isvrb_.accept(new IsVrbVisitor<R,A>(), arg);
      p.subject_2.accept(new SubjectVisitor<R,A>(), arg);
      p.adjective_.accept(new AdjectiveVisitor<R,A>(), arg);
      p.preposition_.accept(new PrepositionVisitor<R,A>(), arg);

      return null;
    }
    public R visit(chalmersbot.Absyn.QWordVerbSub p, A arg)
    {
      /* Code For QWordVerbSub Goes Here */

      p.qword_.accept(new QWordVisitor<R,A>(), arg);
      p.verb_.accept(new VerbVisitor<R,A>(), arg);
      p.subject_.accept(new SubjectVisitor<R,A>(), arg);

      return null;
    }
    public R visit(chalmersbot.Absyn.QWordVerbSubVerb p, A arg)
    {
      /* Code For QWordVerbSubVerb Goes Here */

      p.qword_.accept(new QWordVisitor<R,A>(), arg);
      p.verb_1.accept(new VerbVisitor<R,A>(), arg);
      p.subject_1.accept(new SubjectVisitor<R,A>(), arg);
      p.verb_2.accept(new VerbVisitor<R,A>(), arg);
      p.preposition_.accept(new PrepositionVisitor<R,A>(), arg);
      p.subject_2.accept(new SubjectVisitor<R,A>(), arg);

      return null;
    }
    public R visit(chalmersbot.Absyn.QInWhichSubIsSub p, A arg)
    {
      /* Code For QInWhichSubIsSub Goes Here */

      p.qwinw_.accept(new QWInWVisitor<R,A>(), arg);
      p.subject_1.accept(new SubjectVisitor<R,A>(), arg);
      p.isvrb_.accept(new IsVrbVisitor<R,A>(), arg);
      p.subject_2.accept(new SubjectVisitor<R,A>(), arg);

      return null;
    }
    public R visit(chalmersbot.Absyn.QInWhichSubIsSubVerbPreSub p, A arg)
    {
      /* Code For QInWhichSubIsSubVerbPreSub Goes Here */

      p.qwinw_.accept(new QWInWVisitor<R,A>(), arg);
      p.subject_1.accept(new SubjectVisitor<R,A>(), arg);
      p.isvrb_.accept(new IsVrbVisitor<R,A>(), arg);
      p.subject_2.accept(new SubjectVisitor<R,A>(), arg);
      p.verb_.accept(new VerbVisitor<R,A>(), arg);
      p.preposition_.accept(new PrepositionVisitor<R,A>(), arg);
      p.subject_3.accept(new SubjectVisitor<R,A>(), arg);

      return null;
    }
    public R visit(chalmersbot.Absyn.QInWhichSubIsSubAdj p, A arg)
    {
      /* Code For QInWhichSubIsSubAdj Goes Here */

      p.qwinw_.accept(new QWInWVisitor<R,A>(), arg);
      p.subject_1.accept(new SubjectVisitor<R,A>(), arg);
      p.isvrb_.accept(new IsVrbVisitor<R,A>(), arg);
      p.subject_2.accept(new SubjectVisitor<R,A>(), arg);
      p.adjective_.accept(new AdjectiveVisitor<R,A>(), arg);

      return null;
    }
    public R visit(chalmersbot.Absyn.QHowManySubIsSubPre p, A arg)
    {
      /* Code For QHowManySubIsSubPre Goes Here */

      p.qwhow_.accept(new QWHowVisitor<R,A>(), arg);
      p.subject_1.accept(new SubjectVisitor<R,A>(), arg);
      p.verb_.accept(new VerbVisitor<R,A>(), arg);
      p.subject_2.accept(new SubjectVisitor<R,A>(), arg);
      p.preposition_.accept(new PrepositionVisitor<R,A>(), arg);

      return null;
    }
    public R visit(chalmersbot.Absyn.QHowManySubVerbSubVerb p, A arg)
    {
      /* Code For QHowManySubVerbSubVerb Goes Here */

      p.qwhow_.accept(new QWHowVisitor<R,A>(), arg);
      p.subject_1.accept(new SubjectVisitor<R,A>(), arg);
      p.verb_1.accept(new VerbVisitor<R,A>(), arg);
      p.subject_2.accept(new SubjectVisitor<R,A>(), arg);
      p.verb_2.accept(new VerbVisitor<R,A>(), arg);

      return null;
    }
    public R visit(chalmersbot.Absyn.QHowManySubVerbPreSub p, A arg)
    {
      /* Code For QHowManySubVerbPreSub Goes Here */

      p.qwhow_.accept(new QWHowVisitor<R,A>(), arg);
      p.subject_1.accept(new SubjectVisitor<R,A>(), arg);
      p.verb_.accept(new VerbVisitor<R,A>(), arg);
      p.preposition_.accept(new PrepositionVisitor<R,A>(), arg);
      p.subject_2.accept(new SubjectVisitor<R,A>(), arg);

      return null;
    }
    public R visit(chalmersbot.Absyn.QHowManySubVerbAdjPreSub p, A arg)
    {
      /* Code For QHowManySubVerbAdjPreSub Goes Here */

      p.qwhow_.accept(new QWHowVisitor<R,A>(), arg);
      p.subject_1.accept(new SubjectVisitor<R,A>(), arg);
      p.verb_.accept(new VerbVisitor<R,A>(), arg);
      p.adjective_.accept(new AdjectiveVisitor<R,A>(), arg);
      p.preposition_.accept(new PrepositionVisitor<R,A>(), arg);
      p.subject_2.accept(new SubjectVisitor<R,A>(), arg);

      return null;
    }

  }
  public class AuxVerbVisitor<R,A> implements AuxVerb.Visitor<R,A>
  {
    public R visit(chalmersbot.Absyn.AuxiliaryVerb p, A arg)
    {
      /* Code For AuxiliaryVerb Goes Here */

      //p.auxiliarytoken_;

      return null;
    }

  }
  public class IsVrbVisitor<R,A> implements IsVrb.Visitor<R,A>
  {
    public R visit(chalmersbot.Absyn.IsVerb p, A arg)
    {
      /* Code For IsVerb Goes Here */

      //p.istoken_;

      return null;
    }

  }
  public class VrbVisitor<R,A> implements Vrb.Visitor<R,A>
  {
    public R visit(chalmersbot.Absyn.RegularVerb p, A arg)
    {
      /* Code For RegularVerb Goes Here */

      //p.verbtoken_;

      return null;
    }

  }
  public class ToWrdVisitor<R,A> implements ToWrd.Visitor<R,A>
  {
    public R visit(chalmersbot.Absyn.ToWord p, A arg)
    {
      /* Code For ToWord Goes Here */

      //p.totoken_;

      return null;
    }

  }
  public class GoingWrdVisitor<R,A> implements GoingWrd.Visitor<R,A>
  {
    public R visit(chalmersbot.Absyn.GoingWord p, A arg)
    {
      /* Code For GoingWord Goes Here */

      //p.goingtoken_;

      return null;
    }

  }
  public class VerbVisitor<R,A> implements Verb.Visitor<R,A>
  {
    public R visit(chalmersbot.Absyn.VerbGoingTo p, A arg)
    {
      /* Code For VerbGoingTo Goes Here */

      p.goingwrd_.accept(new GoingWrdVisitor<R,A>(), arg);
      p.towrd_.accept(new ToWrdVisitor<R,A>(), arg);
      p.verb_.accept(new VerbVisitor<R,A>(), arg);

      return null;
    }
    public R visit(chalmersbot.Absyn.VerbGoing p, A arg)
    {
      /* Code For VerbGoing Goes Here */

      //p.goingtoken_;

      return null;
    }
    public R visit(chalmersbot.Absyn.VerbTo p, A arg)
    {
      /* Code For VerbTo Goes Here */

      //p.totoken_;

      return null;
    }
    public R visit(chalmersbot.Absyn.VerbMain p, A arg)
    {
      /* Code For VerbMain Goes Here */

      p.vrb_.accept(new VrbVisitor<R,A>(), arg);

      return null;
    }
    public R visit(chalmersbot.Absyn.VerbAuxiliary p, A arg)
    {
      /* Code For VerbAuxiliary Goes Here */

      p.auxverb_.accept(new AuxVerbVisitor<R,A>(), arg);

      return null;
    }
    public R visit(chalmersbot.Absyn.VerbBoth p, A arg)
    {
      /* Code For VerbBoth Goes Here */

      p.auxverb_.accept(new AuxVerbVisitor<R,A>(), arg);
      p.vrb_.accept(new VrbVisitor<R,A>(), arg);

      return null;
    }

  }
  public class InWrdVisitor<R,A> implements InWrd.Visitor<R,A>
  {
    public R visit(chalmersbot.Absyn.InWord p, A arg)
    {
      /* Code For InWord Goes Here */

      //p.intoken_;

      return null;
    }

  }
  public class PrepositionVisitor<R,A> implements Preposition.Visitor<R,A>
  {
    public R visit(chalmersbot.Absyn.Prepositions p, A arg)
    {
      /* Code For Prepositions Goes Here */

      p.inwrd_.accept(new InWrdVisitor<R,A>(), arg);

      return null;
    }
    public R visit(chalmersbot.Absyn.PrepositionsTok p, A arg)
    {
      /* Code For PrepositionsTok Goes Here */

      //p.prepositiontoken_;

      return null;
    }

  }
  public class NumberRuleVisitor<R,A> implements NumberRule.Visitor<R,A>
  {
    public R visit(chalmersbot.Absyn.NumberRuleNumberDigitToken p, A arg)
    {
      /* Code For NumberRuleNumberDigitToken Goes Here */

      //p.numberdigittoken_;

      return null;
    }
    public R visit(chalmersbot.Absyn.NumberRuleNumberTextToken p, A arg)
    {
      /* Code For NumberRuleNumberTextToken Goes Here */

      //p.numbertexttoken_;

      return null;
    }

  }
  public class AdjectiveVisitor<R,A> implements Adjective.Visitor<R,A>
  {
    public R visit(chalmersbot.Absyn.AdjectiveAdjectivesToken p, A arg)
    {
      /* Code For AdjectiveAdjectivesToken Goes Here */

      //p.adjectivestoken_;

      return null;
    }
    public R visit(chalmersbot.Absyn.AdjectiveManyWrd p, A arg)
    {
      /* Code For AdjectiveManyWrd Goes Here */

      p.manywrd_.accept(new ManyWrdVisitor<R,A>(), arg);

      return null;
    }

  }
  public class ManyWrdVisitor<R,A> implements ManyWrd.Visitor<R,A>
  {
    public R visit(chalmersbot.Absyn.ManyWord p, A arg)
    {
      /* Code For ManyWord Goes Here */

      //p.manytoken_;

      return null;
    }

  }
  public class SpecialWordTokenVisitor<R,A> implements SpecialWordToken.Visitor<R,A>
  {
    public R visit(chalmersbot.Absyn.SpecialWordTokenSNounSToken p, A arg)
    {
      /* Code For SpecialWordTokenSNounSToken Goes Here */

      //p.snounstoken_;

      return null;
    }
    public R visit(chalmersbot.Absyn.SpecialWordTokenSNounEsToken p, A arg)
    {
      /* Code For SpecialWordTokenSNounEsToken Goes Here */

      //p.snounestoken_;

      return null;
    }

  }
  public class NameRuleVisitor<R,A> implements NameRule.Visitor<R,A>
  {
    public R visit(chalmersbot.Absyn.NameRuleNameToken p, A arg)
    {
      /* Code For NameRuleNameToken Goes Here */

      //p.nametoken_;

      return null;
    }

  }
  public class CodeRuleVisitor<R,A> implements CodeRule.Visitor<R,A>
  {
    public R visit(chalmersbot.Absyn.CodeRuleCodeToken p, A arg)
    {
      /* Code For CodeRuleCodeToken Goes Here */

      //p.codetoken_;

      return null;
    }

  }
  public class QWInWVisitor<R,A> implements QWInW.Visitor<R,A>
  {
    public R visit(chalmersbot.Absyn.QWInWhich p, A arg)
    {
      /* Code For QWInWhich Goes Here */

      p.inwrd_.accept(new InWrdVisitor<R,A>(), arg);
      //p.qwhichtoken_;

      return null;
    }

  }
  public class QWHowVisitor<R,A> implements QWHow.Visitor<R,A>
  {
    public R visit(chalmersbot.Absyn.QWHowMany p, A arg)
    {
      /* Code For QWHowMany Goes Here */

      //p.qhowtoken_;
      p.manywrd_.accept(new ManyWrdVisitor<R,A>(), arg);

      return null;
    }

  }
  public class QWordVisitor<R,A> implements QWord.Visitor<R,A>
  {
    public R visit(chalmersbot.Absyn.QWordQWordToken p, A arg)
    {
      /* Code For QWordQWordToken Goes Here */

      //p.qwordtoken_;

      return null;
    }
    public R visit(chalmersbot.Absyn.QWordQWhichToken p, A arg)
    {
      /* Code For QWordQWhichToken Goes Here */

      //p.qwhichtoken_;

      return null;
    }
    public R visit(chalmersbot.Absyn.QWordQHowToken p, A arg)
    {
      /* Code For QWordQHowToken Goes Here */

      //p.qhowtoken_;

      return null;
    }

  }
  public class SubjectVisitor<R,A> implements Subject.Visitor<R,A>
  {
    public R visit(chalmersbot.Absyn.SubjectToList p, A arg)
    {
      /* Code For SubjectToList Goes Here */

      p.subjectlst_.accept(new SubjectLstVisitor<R,A>(), arg);

      return null;
    }

  }
  public class SubjectLstVisitor<R,A> implements SubjectLst.Visitor<R,A>
  {
    public R visit(chalmersbot.Absyn.SubjectList p, A arg)
    {
      /* Code For SubjectList Goes Here */

      p.subjectlst_.accept(new SubjectLstVisitor<R,A>(), arg);
      p.subjectwrd_.accept(new SubjectWrdVisitor<R,A>(), arg);

      return null;
    }
    public R visit(chalmersbot.Absyn.SubjectListElement p, A arg)
    {
      /* Code For SubjectListElement Goes Here */

      p.subjectwrd_.accept(new SubjectWrdVisitor<R,A>(), arg);

      return null;
    }

  }
  public class SubjectWrdVisitor<R,A> implements SubjectWrd.Visitor<R,A>
  {
    public R visit(chalmersbot.Absyn.SubjectCode p, A arg)
    {
      /* Code For SubjectCode Goes Here */

      p.coderule_.accept(new CodeRuleVisitor<R,A>(), arg);

      return null;
    }
    public R visit(chalmersbot.Absyn.SubjectBasic p, A arg)
    {
      /* Code For SubjectBasic Goes Here */

      //p.subjecttoken_;

      return null;
    }
    public R visit(chalmersbot.Absyn.SubjectSpecialWord p, A arg)
    {
      /* Code For SubjectSpecialWord Goes Here */

      p.specialwordtoken_.accept(new SpecialWordTokenVisitor<R,A>(), arg);

      return null;
    }
    public R visit(chalmersbot.Absyn.SubjectDeterminant p, A arg)
    {
      /* Code For SubjectDeterminant Goes Here */

      //p.determinanttoken_;

      return null;
    }
    public R visit(chalmersbot.Absyn.SubjectInWord p, A arg)
    {
      /* Code For SubjectInWord Goes Here */

      p.inwrd_.accept(new InWrdVisitor<R,A>(), arg);

      return null;
    }
    public R visit(chalmersbot.Absyn.SubjectSmallWord p, A arg)
    {
      /* Code For SubjectSmallWord Goes Here */

      //p.smallwordtoken_;

      return null;
    }
    public R visit(chalmersbot.Absyn.SubjectPronoun p, A arg)
    {
      /* Code For SubjectPronoun Goes Here */

      //p.pronountoken_;

      return null;
    }
    public R visit(chalmersbot.Absyn.SubjectPeriod p, A arg)
    {
      /* Code For SubjectPeriod Goes Here */

      //p.periodtoken_;

      return null;
    }
    public R visit(chalmersbot.Absyn.SubjectPeriodNr p, A arg)
    {
      /* Code For SubjectPeriodNr Goes Here */

      //p.periodtoken_;
      p.numberrule_.accept(new NumberRuleVisitor<R,A>(), arg);

      return null;
    }
    public R visit(chalmersbot.Absyn.SubjectName p, A arg)
    {
      /* Code For SubjectName Goes Here */

      p.namerule_.accept(new NameRuleVisitor<R,A>(), arg);

      return null;
    }

  }
  public class RestVisitor<R,A> implements Rest.Visitor<R,A>
  {
    public R visit(chalmersbot.Absyn.RestList p, A arg)
    {
      /* Code For RestList Goes Here */

      p.rest_1.accept(new RestVisitor<R,A>(), arg);
      p.rest_2.accept(new RestVisitor<R,A>(), arg);

      return null;
    }
    public R visit(chalmersbot.Absyn.RestIdent p, A arg)
    {
      /* Code For RestIdent Goes Here */

      //p.ident_;

      return null;
    }
    public R visit(chalmersbot.Absyn.RestVerb p, A arg)
    {
      /* Code For RestVerb Goes Here */

      p.verb_.accept(new VerbVisitor<R,A>(), arg);

      return null;
    }
    public R visit(chalmersbot.Absyn.RestPreposition p, A arg)
    {
      /* Code For RestPreposition Goes Here */

      //p.prepositiontoken_;

      return null;
    }
    public R visit(chalmersbot.Absyn.RestSubject p, A arg)
    {
      /* Code For RestSubject Goes Here */

      p.subject_.accept(new SubjectVisitor<R,A>(), arg);

      return null;
    }
    public R visit(chalmersbot.Absyn.RestAdjective p, A arg)
    {
      /* Code For RestAdjective Goes Here */

      p.adjective_.accept(new AdjectiveVisitor<R,A>(), arg);

      return null;
    }

  }
}